package com.feel.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.feel.api.domain.FUser;
import com.feel.api.mapper.FUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.feel.api.service.IFUserService;

/**
 * 用户Service业务层处理
 *
 * @author z
 * @date 2020-09-30
 */
@Service
public class FUserServiceImpl extends ServiceImpl<FUserMapper, FUser> implements IFUserService {

    @Autowired
    private FUserMapper fUserMapper;

    /**
     * 查询用户
     *
     * @param id 用户ID
     * @return 用户
     */
    @Override
    public FUser selectFUserById(Long id)
    {
        return fUserMapper.selectFUserById(id);
    }

    /**
     * 查询用户列表
     *
     * @param fUser 用户
     * @return 用户
     */
    @Override
    public List<FUser> selectFUserList(FUser fUser)
    {
        return fUserMapper.selectFUserList(fUser);
    }

    /**
     * 新增用户
     *
     * @param fUser 用户
     * @return 结果
     */
    @Override
    public int insertFUser(FUser fUser)
    {
        return fUserMapper.insertFUser(fUser);
    }

    /**
     * 修改用户
     *
     * @param fUser 用户
     * @return 结果
     */
    @Override
    public int updateFUser(FUser fUser)
    {
        return fUserMapper.updateFUser(fUser);
    }

    /**
     * 批量删除用户
     *
     * @param ids 需要删除的用户ID
     * @return 结果
     */
    @Override
    public int deleteFUserByIds(Long[] ids)
    {
        return fUserMapper.deleteFUserByIds(ids);
    }

    /**
     * 删除用户信息
     *
     * @param id 用户ID
     * @return 结果
     */
    @Override
    public int deleteFUserById(Long id)
    {
        return fUserMapper.deleteFUserById(id);
    }
}
